Optimal. Leaf size=245 \[ \frac {6 b^2 d^2 e n^2 x^r}{r^3}+\frac {3 b^2 d e^2 n^2 x^{2 r}}{4 r^3}+\frac {2 b^2 e^3 n^2 x^{3 r}}{27 r^3}-\frac {6 b d^2 e n x^r \left (a+b \log \left (c x^n\right )\right )}{r^2}-\frac {3 b d e^2 n x^{2 r} \left (a+b \log \left (c x^n\right )\right )}{2 r^2}-\frac {2 b e^3 n x^{3 r} \left (a+b \log \left (c x^n\right )\right )}{9 r^2}+\frac {3 d^2 e x^r \left (a+b \log \left (c x^n\right )\right )^2}{r}+\frac {3 d e^2 x^{2 r} \left (a+b \log \left (c x^n\right )\right )^2}{2 r}+\frac {e^3 x^{3 r} \left (a+b \log \left (c x^n\right )\right )^2}{3 r}+\frac {d^3 \left (a+b \log \left (c x^n\right )\right )^3}{3 b n} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.21, antiderivative size = 245, normalized size of antiderivative = 1.00, number of steps
used = 10, number of rules used = 5, integrand size = 25, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.200, Rules used = {2395, 2339,
30, 2342, 2341} \begin {gather*} \frac {d^3 \left (a+b \log \left (c x^n\right )\right )^3}{3 b n}-\frac {6 b d^2 e n x^r \left (a+b \log \left (c x^n\right )\right )}{r^2}+\frac {3 d^2 e x^r \left (a+b \log \left (c x^n\right )\right )^2}{r}-\frac {3 b d e^2 n x^{2 r} \left (a+b \log \left (c x^n\right )\right )}{2 r^2}+\frac {3 d e^2 x^{2 r} \left (a+b \log \left (c x^n\right )\right )^2}{2 r}-\frac {2 b e^3 n x^{3 r} \left (a+b \log \left (c x^n\right )\right )}{9 r^2}+\frac {e^3 x^{3 r} \left (a+b \log \left (c x^n\right )\right )^2}{3 r}+\frac {6 b^2 d^2 e n^2 x^r}{r^3}+\frac {3 b^2 d e^2 n^2 x^{2 r}}{4 r^3}+\frac {2 b^2 e^3 n^2 x^{3 r}}{27 r^3} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 30
Rule 2339
Rule 2341
Rule 2342
Rule 2395
Rubi steps
\begin {align*} \int \frac {\left (d+e x^r\right )^3 \left (a+b \log \left (c x^n\right )\right )^2}{x} \, dx &=\int \left (\frac {d^3 \left (a+b \log \left (c x^n\right )\right )^2}{x}+3 d^2 e x^{-1+r} \left (a+b \log \left (c x^n\right )\right )^2+3 d e^2 x^{-1+2 r} \left (a+b \log \left (c x^n\right )\right )^2+e^3 x^{-1+3 r} \left (a+b \log \left (c x^n\right )\right )^2\right ) \, dx\\ &=d^3 \int \frac {\left (a+b \log \left (c x^n\right )\right )^2}{x} \, dx+\left (3 d^2 e\right ) \int x^{-1+r} \left (a+b \log \left (c x^n\right )\right )^2 \, dx+\left (3 d e^2\right ) \int x^{-1+2 r} \left (a+b \log \left (c x^n\right )\right )^2 \, dx+e^3 \int x^{-1+3 r} \left (a+b \log \left (c x^n\right )\right )^2 \, dx\\ &=\frac {3 d^2 e x^r \left (a+b \log \left (c x^n\right )\right )^2}{r}+\frac {3 d e^2 x^{2 r} \left (a+b \log \left (c x^n\right )\right )^2}{2 r}+\frac {e^3 x^{3 r} \left (a+b \log \left (c x^n\right )\right )^2}{3 r}+\frac {d^3 \text {Subst}\left (\int x^2 \, dx,x,a+b \log \left (c x^n\right )\right )}{b n}-\frac {\left (6 b d^2 e n\right ) \int x^{-1+r} \left (a+b \log \left (c x^n\right )\right ) \, dx}{r}-\frac {\left (3 b d e^2 n\right ) \int x^{-1+2 r} \left (a+b \log \left (c x^n\right )\right ) \, dx}{r}-\frac {\left (2 b e^3 n\right ) \int x^{-1+3 r} \left (a+b \log \left (c x^n\right )\right ) \, dx}{3 r}\\ &=\frac {6 b^2 d^2 e n^2 x^r}{r^3}+\frac {3 b^2 d e^2 n^2 x^{2 r}}{4 r^3}+\frac {2 b^2 e^3 n^2 x^{3 r}}{27 r^3}-\frac {6 b d^2 e n x^r \left (a+b \log \left (c x^n\right )\right )}{r^2}-\frac {3 b d e^2 n x^{2 r} \left (a+b \log \left (c x^n\right )\right )}{2 r^2}-\frac {2 b e^3 n x^{3 r} \left (a+b \log \left (c x^n\right )\right )}{9 r^2}+\frac {3 d^2 e x^r \left (a+b \log \left (c x^n\right )\right )^2}{r}+\frac {3 d e^2 x^{2 r} \left (a+b \log \left (c x^n\right )\right )^2}{2 r}+\frac {e^3 x^{3 r} \left (a+b \log \left (c x^n\right )\right )^2}{3 r}+\frac {d^3 \left (a+b \log \left (c x^n\right )\right )^3}{3 b n}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.29, size = 262, normalized size = 1.07 \begin {gather*} \frac {1}{3} b^2 d^3 n^2 \log ^3(x)-b d^3 n \log ^2(x) \left (a+b \log \left (c x^n\right )\right )+d^3 \log (x) \left (a+b \log \left (c x^n\right )\right )^2+\frac {e x^r \left (18 a^2 r^2 \left (18 d^2+9 d e x^r+2 e^2 x^{2 r}\right )-6 a b n r \left (108 d^2+27 d e x^r+4 e^2 x^{2 r}\right )+b^2 n^2 \left (648 d^2+81 d e x^r+8 e^2 x^{2 r}\right )-6 b r \left (-6 a r \left (18 d^2+9 d e x^r+2 e^2 x^{2 r}\right )+b n \left (108 d^2+27 d e x^r+4 e^2 x^{2 r}\right )\right ) \log \left (c x^n\right )+18 b^2 r^2 \left (18 d^2+9 d e x^r+2 e^2 x^{2 r}\right ) \log ^2\left (c x^n\right )\right )}{108 r^3} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [C] Result contains higher order function than in optimal. Order 9 vs. order
3.
time = 0.33, size = 3984, normalized size = 16.26
method | result | size |
risch | \(\text {Expression too large to display}\) | \(3984\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A]
time = 0.29, size = 391, normalized size = 1.60 \begin {gather*} \frac {b^{2} e^{3} x^{3 \, r} \log \left (c x^{n}\right )^{2}}{3 \, r} + \frac {3 \, b^{2} d e^{2} x^{2 \, r} \log \left (c x^{n}\right )^{2}}{2 \, r} + \frac {3 \, b^{2} d^{2} e x^{r} \log \left (c x^{n}\right )^{2}}{r} + \frac {b^{2} d^{3} \log \left (c x^{n}\right )^{3}}{3 \, n} - \frac {2}{27} \, b^{2} e^{3} {\left (\frac {3 \, n x^{3 \, r} \log \left (c x^{n}\right )}{r^{2}} - \frac {n^{2} x^{3 \, r}}{r^{3}}\right )} - \frac {3}{4} \, b^{2} d e^{2} {\left (\frac {2 \, n x^{2 \, r} \log \left (c x^{n}\right )}{r^{2}} - \frac {n^{2} x^{2 \, r}}{r^{3}}\right )} - 6 \, b^{2} d^{2} e {\left (\frac {n x^{r} \log \left (c x^{n}\right )}{r^{2}} - \frac {n^{2} x^{r}}{r^{3}}\right )} + \frac {2 \, a b e^{3} x^{3 \, r} \log \left (c x^{n}\right )}{3 \, r} + \frac {3 \, a b d e^{2} x^{2 \, r} \log \left (c x^{n}\right )}{r} + \frac {6 \, a b d^{2} e x^{r} \log \left (c x^{n}\right )}{r} + \frac {a b d^{3} \log \left (c x^{n}\right )^{2}}{n} + a^{2} d^{3} \log \left (x\right ) - \frac {2 \, a b e^{3} n x^{3 \, r}}{9 \, r^{2}} + \frac {a^{2} e^{3} x^{3 \, r}}{3 \, r} - \frac {3 \, a b d e^{2} n x^{2 \, r}}{2 \, r^{2}} + \frac {3 \, a^{2} d e^{2} x^{2 \, r}}{2 \, r} - \frac {6 \, a b d^{2} e n x^{r}}{r^{2}} + \frac {3 \, a^{2} d^{2} e x^{r}}{r} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [B] Leaf count of result is larger than twice the leaf count of optimal. 500 vs.
\(2 (228) = 456\).
time = 0.39, size = 500, normalized size = 2.04 \begin {gather*} \frac {36 \, b^{2} d^{3} n^{2} r^{3} \log \left (x\right )^{3} + 108 \, {\left (b^{2} d^{3} n r^{3} \log \left (c\right ) + a b d^{3} n r^{3}\right )} \log \left (x\right )^{2} + 4 \, {\left (9 \, b^{2} n^{2} r^{2} e^{3} \log \left (x\right )^{2} + 9 \, b^{2} r^{2} e^{3} \log \left (c\right )^{2} - 6 \, {\left (b^{2} n r - 3 \, a b r^{2}\right )} e^{3} \log \left (c\right ) + {\left (2 \, b^{2} n^{2} - 6 \, a b n r + 9 \, a^{2} r^{2}\right )} e^{3} + 6 \, {\left (3 \, b^{2} n r^{2} e^{3} \log \left (c\right ) - {\left (b^{2} n^{2} r - 3 \, a b n r^{2}\right )} e^{3}\right )} \log \left (x\right )\right )} x^{3 \, r} + 81 \, {\left (2 \, b^{2} d n^{2} r^{2} e^{2} \log \left (x\right )^{2} + 2 \, b^{2} d r^{2} e^{2} \log \left (c\right )^{2} - 2 \, {\left (b^{2} d n r - 2 \, a b d r^{2}\right )} e^{2} \log \left (c\right ) + {\left (b^{2} d n^{2} - 2 \, a b d n r + 2 \, a^{2} d r^{2}\right )} e^{2} + 2 \, {\left (2 \, b^{2} d n r^{2} e^{2} \log \left (c\right ) - {\left (b^{2} d n^{2} r - 2 \, a b d n r^{2}\right )} e^{2}\right )} \log \left (x\right )\right )} x^{2 \, r} + 324 \, {\left (b^{2} d^{2} n^{2} r^{2} e \log \left (x\right )^{2} + b^{2} d^{2} r^{2} e \log \left (c\right )^{2} - 2 \, {\left (b^{2} d^{2} n r - a b d^{2} r^{2}\right )} e \log \left (c\right ) + {\left (2 \, b^{2} d^{2} n^{2} - 2 \, a b d^{2} n r + a^{2} d^{2} r^{2}\right )} e + 2 \, {\left (b^{2} d^{2} n r^{2} e \log \left (c\right ) - {\left (b^{2} d^{2} n^{2} r - a b d^{2} n r^{2}\right )} e\right )} \log \left (x\right )\right )} x^{r} + 108 \, {\left (b^{2} d^{3} r^{3} \log \left (c\right )^{2} + 2 \, a b d^{3} r^{3} \log \left (c\right ) + a^{2} d^{3} r^{3}\right )} \log \left (x\right )}{108 \, r^{3}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [B] Leaf count of result is larger than twice the leaf count of optimal. 588 vs.
\(2 (246) = 492\).
time = 16.58, size = 588, normalized size = 2.40 \begin {gather*} \begin {cases} \left (a + b \log {\left (c \right )}\right )^{2} \left (d + e\right )^{3} \log {\left (x \right )} & \text {for}\: n = 0 \wedge r = 0 \\\left (d + e\right )^{3} \left (\begin {cases} \frac {a^{2} \log {\left (c x^{n} \right )} + a b \log {\left (c x^{n} \right )}^{2} + \frac {b^{2} \log {\left (c x^{n} \right )}^{3}}{3}}{n} & \text {for}\: n \neq 0 \\\left (a^{2} + 2 a b \log {\left (c \right )} + b^{2} \log {\left (c \right )}^{2}\right ) \log {\left (x \right )} & \text {otherwise} \end {cases}\right ) & \text {for}\: r = 0 \\\left (a + b \log {\left (c \right )}\right )^{2} \left (d^{3} \log {\left (x \right )} + \frac {3 d^{2} e x^{r}}{r} + \frac {3 d e^{2} x^{2 r}}{2 r} + \frac {e^{3} x^{3 r}}{3 r}\right ) & \text {for}\: n = 0 \\\frac {a^{2} d^{3} \log {\left (c x^{n} \right )}}{n} + \frac {3 a^{2} d^{2} e x^{r}}{r} + \frac {3 a^{2} d e^{2} x^{2 r}}{2 r} + \frac {a^{2} e^{3} x^{3 r}}{3 r} + \frac {a b d^{3} \log {\left (c x^{n} \right )}^{2}}{n} - \frac {6 a b d^{2} e n x^{r}}{r^{2}} + \frac {6 a b d^{2} e x^{r} \log {\left (c x^{n} \right )}}{r} - \frac {3 a b d e^{2} n x^{2 r}}{2 r^{2}} + \frac {3 a b d e^{2} x^{2 r} \log {\left (c x^{n} \right )}}{r} - \frac {2 a b e^{3} n x^{3 r}}{9 r^{2}} + \frac {2 a b e^{3} x^{3 r} \log {\left (c x^{n} \right )}}{3 r} + \frac {b^{2} d^{3} \log {\left (c x^{n} \right )}^{3}}{3 n} + \frac {6 b^{2} d^{2} e n^{2} x^{r}}{r^{3}} - \frac {6 b^{2} d^{2} e n x^{r} \log {\left (c x^{n} \right )}}{r^{2}} + \frac {3 b^{2} d^{2} e x^{r} \log {\left (c x^{n} \right )}^{2}}{r} + \frac {3 b^{2} d e^{2} n^{2} x^{2 r}}{4 r^{3}} - \frac {3 b^{2} d e^{2} n x^{2 r} \log {\left (c x^{n} \right )}}{2 r^{2}} + \frac {3 b^{2} d e^{2} x^{2 r} \log {\left (c x^{n} \right )}^{2}}{2 r} + \frac {2 b^{2} e^{3} n^{2} x^{3 r}}{27 r^{3}} - \frac {2 b^{2} e^{3} n x^{3 r} \log {\left (c x^{n} \right )}}{9 r^{2}} + \frac {b^{2} e^{3} x^{3 r} \log {\left (c x^{n} \right )}^{2}}{3 r} & \text {otherwise} \end {cases} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [B] Leaf count of result is larger than twice the leaf count of optimal. 634 vs.
\(2 (228) = 456\).
time = 3.75, size = 634, normalized size = 2.59 \begin {gather*} \frac {1}{3} \, b^{2} d^{3} n^{2} \log \left (x\right )^{3} + \frac {3 \, b^{2} d^{2} n^{2} x^{r} e \log \left (x\right )^{2}}{r} + b^{2} d^{3} n \log \left (c\right ) \log \left (x\right )^{2} + \frac {6 \, b^{2} d^{2} n x^{r} e \log \left (c\right ) \log \left (x\right )}{r} + b^{2} d^{3} \log \left (c\right )^{2} \log \left (x\right ) + a b d^{3} n \log \left (x\right )^{2} + \frac {3 \, b^{2} d n^{2} x^{2 \, r} e^{2} \log \left (x\right )^{2}}{2 \, r} + \frac {3 \, b^{2} d^{2} x^{r} e \log \left (c\right )^{2}}{r} - \frac {6 \, b^{2} d^{2} n^{2} x^{r} e \log \left (x\right )}{r^{2}} + \frac {6 \, a b d^{2} n x^{r} e \log \left (x\right )}{r} + 2 \, a b d^{3} \log \left (c\right ) \log \left (x\right ) + \frac {3 \, b^{2} d n x^{2 \, r} e^{2} \log \left (c\right ) \log \left (x\right )}{r} + \frac {b^{2} n^{2} x^{3 \, r} e^{3} \log \left (x\right )^{2}}{3 \, r} - \frac {6 \, b^{2} d^{2} n x^{r} e \log \left (c\right )}{r^{2}} + \frac {6 \, a b d^{2} x^{r} e \log \left (c\right )}{r} + \frac {3 \, b^{2} d x^{2 \, r} e^{2} \log \left (c\right )^{2}}{2 \, r} + a^{2} d^{3} \log \left (x\right ) - \frac {3 \, b^{2} d n^{2} x^{2 \, r} e^{2} \log \left (x\right )}{2 \, r^{2}} + \frac {3 \, a b d n x^{2 \, r} e^{2} \log \left (x\right )}{r} + \frac {2 \, b^{2} n x^{3 \, r} e^{3} \log \left (c\right ) \log \left (x\right )}{3 \, r} + \frac {6 \, b^{2} d^{2} n^{2} x^{r} e}{r^{3}} - \frac {6 \, a b d^{2} n x^{r} e}{r^{2}} + \frac {3 \, a^{2} d^{2} x^{r} e}{r} - \frac {3 \, b^{2} d n x^{2 \, r} e^{2} \log \left (c\right )}{2 \, r^{2}} + \frac {3 \, a b d x^{2 \, r} e^{2} \log \left (c\right )}{r} + \frac {b^{2} x^{3 \, r} e^{3} \log \left (c\right )^{2}}{3 \, r} - \frac {2 \, b^{2} n^{2} x^{3 \, r} e^{3} \log \left (x\right )}{9 \, r^{2}} + \frac {2 \, a b n x^{3 \, r} e^{3} \log \left (x\right )}{3 \, r} + \frac {3 \, b^{2} d n^{2} x^{2 \, r} e^{2}}{4 \, r^{3}} - \frac {3 \, a b d n x^{2 \, r} e^{2}}{2 \, r^{2}} + \frac {3 \, a^{2} d x^{2 \, r} e^{2}}{2 \, r} - \frac {2 \, b^{2} n x^{3 \, r} e^{3} \log \left (c\right )}{9 \, r^{2}} + \frac {2 \, a b x^{3 \, r} e^{3} \log \left (c\right )}{3 \, r} + \frac {2 \, b^{2} n^{2} x^{3 \, r} e^{3}}{27 \, r^{3}} - \frac {2 \, a b n x^{3 \, r} e^{3}}{9 \, r^{2}} + \frac {a^{2} x^{3 \, r} e^{3}}{3 \, r} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [F]
time = 0.00, size = -1, normalized size = -0.00 \begin {gather*} \int \frac {{\left (d+e\,x^r\right )}^3\,{\left (a+b\,\ln \left (c\,x^n\right )\right )}^2}{x} \,d x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________